import com.kk.crowd.ProjectConsumerMainClass;
import com.kk.crowd.util.CrowdUtil;
import com.kk.crowd.util.ResultEntity;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = ProjectConsumerMainClass.class)
public class testUtil {
    @Test
    public void  test1() throws FileNotFoundException {
        FileInputStream inputStream = new FileInputStream("aaa.jpg");
        ResultEntity<String> resultEntity = CrowdUtil.uploadFileToOss("oss-cn-shanghai.aliyuncs.com", "LTAI5tAkcRAsqnUEZhrjcdVu", "zvmd72XQ1DY3jWHPHXFZ12LCLiXVEY", inputStream, "wangkun123", "wangkun123.oss-cn-shanghai.aliyuncs.com", "aaa.jpg");
        System.out.println(resultEntity);
    }

}
